package org.jeecg.modules.charge.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;
import org.jeecg.entity.charge.*;
import org.jeecg.modules.charge.entity.ChargeCollect;
import org.jeecg.modules.charge.model.ChargeGenerateModel;
import org.jeecg.modules.charge.vo.DictModel;
import org.jeecg.vo.charge.ChargeBillsJump;
import org.jeecg.vo.charge.ChargeBillsJumpAll;

import java.math.BigDecimal;
import java.util.List;

/**
 * @Description: 账单
 * @Author: jeecg-boot
 * @Date:   2019-08-08
 * @Version: V1.0
 */
public interface IChargeBillsService extends IService<ChargeBills> {
    ChargeBillsJumpAll getByChargeBillsAll(List<String> ids);

    List<ChargeBills> getChargeBillsByInvoiceId(String invoiceId);

    ChargeBillsJumpAll getMethodUser();

    List<ChargeBills> getChargeBills(ChargeBills chargeBills);

    List<DictModel> getRoomproperty();

    ChargeInvoice getBillsDetails(ChargeBills chargeBills);

    public List<ChargeGenerateModel> getByGenerateCustomer(String projectId, String floorId, String roomName);

    public List<ChargeGenerateModel> getByGenerateTenant(String projectId, String floorId, String roomName);

    String createChargeBills(ChargeGenerateBills chargeGenerateBills);

    Result<String> createChargeBillsNew(ChargeGenerateBills chargeGenerateBills);

    Result<String> createChargeBillsContractNew(ChargeGenerateBills chargeGenerateBills);

    public List<ChargeBillsJump> getByChargeBills(List<String> ids);

    public List<ChargeBills> getFeeItemId(List<String> ids);

    public List<ChargeBills> listById(String[] ids);

    public List<ChargeBills> listByBills(List<String> ids);

    public ChargeFeeitem getByFeeCode(String feeCode, String projectId);

    public  Integer updateBills(ChargeBills bills);

    Integer updateBillsBatch(List<ChargeBills> billsList);

    public List<ChargeBills> getChargeBillsAll(Page<ChargeBills> page, ChargeBills chargeBills);//所有账单根据业主与租户的Id

    public List<ChargeBills> selectBillsAll(ChargeBills chargeBills);//不分页查询所有账单

    public List<ChargeBills> getByRoomBillss(ChargeBills chargeBills);//查询合并收费的账单业主或者租户

    Result<String> splitBills(ChargeBills chargeBills);

    String openInvoiceInfo(ChargeInvoice chargeInvoice);

    public List<ChargeBills> findBillsPage(IPage<ChargeBills> page, ChargeBills chargeBills);

    public List<ChargeCollect> getDayCollect(ChargeCollect chargeCollect);//汇总表查询

    Integer insertListHistory(List<ChargeBills> chargeBills); //插入历史账单

    List<ChargeBills> findByOrderId(String orderId); //根据订单id查询账单列表

    void deleteByOrderId(String orderId);

    void insertBills(ChargeBills newBills);

    Result delete(String ids);

    public Integer updateDiscountMoney(BigDecimal money, String[] ids);

    public String getLastZjCny(ChargeBills chargeBills);

    public List<ChargeBills> getBillsByIds(List<String> ids);

    List<ChargeBills> queryRoomBills(List roomIdList,String spiltDate);

    List<ChargeBills> queryContractBills(String contractId);

    List<ChargeBills> findPage(Page<ChargeBills> page, ChargeBills chargeBills);

    List<ChargeBills> findList(ChargeBills chargeBills);

    void billDelete(String id);

    void batchBillDelete(List<String> ids);

    List<ChargeBills> queryRoomAllBills(List<String> roomId);

    List<ChargeBills> queryContractAllBills(String contractId, String zjCny);

    void canCellAndGenerateRoomBills(List<CanGeBillsVo> cancellBillsVoList);

    ChargeBills getMaxPayBills(String roomId);

    void canCellBills(List<String> roomIds, String spiltDate);

    void canCellAllBills(List<String> roomIds);
}
